/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.accountinfo.entity;

import org.hibernate.validator.constraints.Length;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 添加地址Entity
 * @author ljh
 * @version 2016-12-15
 */
public class AccountInfoAddress extends DataEntity<AccountInfoAddress> {
	
	private static final long serialVersionUID = 1L;
	private String province;		// 省份
	private String city;		// 市区
	private String detail;		// 详细信息
	private AccountInfo accountInfo;		// 关联用户
	private Integer priority;		// 排序
	private Integer defaultAddress;     // 1默认地址0非默认地址
    private String countyTown;      // 县，区
    private String addUsername;     // add_username
    private String addTelnum;       // add_telnum
	
	
	public AccountInfoAddress() {
		super();
	}

	public AccountInfoAddress(String id){
		super(id);
	}
	
	public AccountInfoAddress(AccountInfo accountInfo){
        this();
        this.accountInfo=accountInfo;
    }

	@Length(min=0, max=45, message="省份长度必须介于 0 和 45 之间")
	public String getProvince() {
		return province;
	}

	public void setProvince(String province) {
		this.province = province;
	}
	
	@Length(min=0, max=45, message="市区长度必须介于 0 和 45 之间")
	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}
	
	@Length(min=0, max=200, message="详细信息长度必须介于 0 和 200 之间")
	public String getDetail() {
		return detail;
	}

	public void setDetail(String detail) {
		this.detail = detail;
	}
	
	@JsonIgnore
	public AccountInfo getAccountInfo() {
        return accountInfo;
    }

    public void setAccountInfo(AccountInfo accountInfo) {
        this.accountInfo = accountInfo;
    }

    public Integer getPriority() {
		return priority;
	}

	public void setPriority(Integer priority) {
		this.priority = priority;
	}
	
	public Integer getDefaultAddress() {
		return defaultAddress;
	}

	public void setDefaultAddress(Integer defaultAddress) {
		this.defaultAddress = defaultAddress;
	}
	
	@Length(min=0, max=45, message="县，区长度必须介于 0 和 45 之间")
	public String getCountyTown() {
		return countyTown;
	}

	public void setCountyTown(String countyTown) {
		this.countyTown = countyTown;
	}

    public String getAddUsername() {
        return addUsername;
    }

    public void setAddUsername(String addUsername) {
        this.addUsername = addUsername;
    }

    public String getAddTelnum() {
        return addTelnum;
    }

    public void setAddTelnum(String addTelnum) {
        this.addTelnum = addTelnum;
    }	
}